//
//  XTCAppointmentDetailPersonShow.m
//  ppkc2016
//
//  Created by 拼凑的断音 on 16/4/11.
//  Copyright © 2016年 拼凑的断音. All rights reserved.
//

#import "XTCAppointmentDetailPersonShow.h"

@interface XTCAppointmentDetailPersonShow ()

@property (nonatomic) XVVReleasePersonInfomation *show;

@end

@implementation XTCAppointmentDetailPersonShow
{
    CGFloat showHeight;
}

-(XVVReleasePersonInfomation*)show
{
    if (_show==nil)
    {
        _show = [[XVVReleasePersonInfomation alloc] init];
        [self addSubview:_show];
    }
    return _show;
}

-(void)initUI
{
    [self show];
}

-(void)refreshLayout:(CGRect)frame
{
    _show.frame = CGRectMake(0
                             , 10
                             , frame.size.width
                             , showHeight);
}


-(void)setCellWithData:(XMLAppointmentDetail*)model personType:(XVVReleasePersonInfomationType)useType
{
    [_show setData:model personType:useType];
    showHeight = [XVVReleasePersonInfomation getHeight:model personType:useType];
    [self refreshLayout:self.frame];
}

+(CGFloat)getHeight:(XMLAppointmentDetail*)model personType:(XVVReleasePersonInfomationType)useType
{
    return [XVVReleasePersonInfomation getHeight:model personType:useType]+10+5;
}

@end
